//编写好规则
export const rules = {
  name:[
    {required:true,message:'用户名是必传内容',trigger:'blur'},
    {pattern:/^[a-z0-9]{5,10}$/,message:'用户名必须是5-10个字母或数字',trigger:'blur'}
  ],
  password:[
    {required:true,message:'密码是必传内容',trigger:'blur'},
    {pattern:/^[a-z0-9]{3,}$/,message:'用户名必须是3位以上的字母或数字',trigger:'blur'}
  ],
  phone:[
    {required:true,message:'手机号是必传内容',trigger:'blur'},
    {pattern:/^1[3456789]\d{9}$/,message:'请输入正确的手机号格式',trigger:'blur'}
  ],
  code:[
    {required:true,message:'验证码是必传内容',trigger:'blur'},
    {pattern:/^[0-9]{4}$/,message:'验证码必须是4位数字',trigger:'blur'}
  ]
}
